import { FC } from 'react'
import { Link } from 'react-router-dom'
import { useSelector } from 'react-redux'
import { StateType } from '@/store'
import { UserStateType } from '@/store/userReducer'
const UserInfo: FC = () => {
  const store = useSelector<StateType>(state => state.user) as UserStateType
  return (
    <>
      <Link to="/login">{store.username}</Link>
    </>
  )
}

export default UserInfo
